home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_aet_guybrush.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  147 lines

  1. # Jones 3D Cog Script
  2. #
  3. # aet_GuyBrush.cog    
  4. #
  5. # Shhhhh...it's a secret...
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9. symbols
  10.  
  11. message        startup
  12. message        entered
  13. message        arrived
  14. message        crossed
  15.  
  16. sector        gosector
  17.  
  18. surface        closetrigger
  19. surface        mustriggeron
  20. surface        mustriggeroff
  21. surface        guytriggeron
  22. surface        guytriggeroff
  23.  
  24. thing        player                            local
  25.  
  26. thing        glowbugX
  27. thing        wall
  28.  
  29. sound        guymusic=mus_aet_pocket_mky.wav    local
  30. sound        guyline=INXJ043.wav                local
  31.  
  32. int            curframe=1                        local
  33. int            linedone=0                        local
  34. int            startdone=0                        local    
  35. int            closedone=0                        local
  36. int            musplayed=0                        local
  37. int            looping                            local
  38.  
  39. end
  40.  
  41. # ========================================================================================
  42. code
  43.  
  44. startup:
  45.  
  46. player = GetLocalPlayerThing();
  47.  
  48. AISetCutsceneMode(glowbugX);
  49.  
  50. SetThingFlags(glowbugX, 0x80000);
  51.  
  52. return;
  53.  
  54. # ........................................................................................
  55. entered:
  56.     
  57. if ((GetSenderRef() == gosector) && (GetSourceRef() == player) && (startdone == 0))
  58.     {
  59.     startdone = 1;
  60.     ClearThingFlags(glowbugX, 0x80000);
  61.     Sleep(10.0);
  62.     AISetLookFrame(glowbugX, curframe);
  63.     AISetMoveFrame(glowbugX, curframe);
  64.     AISetMoveSpeed(glowbugX, 1.0);
  65.     printint(curframe);
  66.     }
  67.     
  68. return;
  69.     
  70. # ........................................................................................
  71. arrived:
  72.     
  73. if (GetThingHealth(glowbugX) <= 0)
  74.     {
  75.  
  76.     return;
  77.  
  78.     }
  79. if ((GetSenderRef() == glowbugX) && (curframe == 13))
  80.     {
  81.     DestroyThing(glowbugX);
  82.  
  83.     return;
  84.     
  85.     }
  86. if ((GetSenderRef() == glowbugX) && (curframe == 10))
  87.     {
  88.     ThingFadeAnim(wall, 1.0, 0.5, 3.0, 0);
  89.     Sleep(3.0);
  90.     SetCollideType(wall, 0);
  91.     curframe = curframe + 1;
  92.     AISetLookFrame(glowbugX, curframe);
  93.     AISetMoveFrame(glowbugX, curframe);
  94.     AISetMoveSpeed(glowbugX, 1.0);
  95.     printint(curframe);
  96.     }
  97. if (GetSenderRef() == glowbugX)
  98.     {
  99.     curframe = curframe + 1;
  100.     AISetLookFrame(glowbugX, curframe);
  101.     AISetMoveFrame(glowbugX, curframe);
  102.     AISetMoveSpeed(glowbugX, 1.0);
  103.     printint(curframe);
  104.     }
  105.  
  106. return;
  107.  
  108. # ........................................................................................
  109. crossed:
  110.  
  111. if ((GetSenderRef() == closetrigger) && (GetSourceRef() == player) && (closedone == 0))
  112.     {
  113.     closedone = 1;
  114.     ThingFadeAnim(wall, 0.5, 1.0, 3.0, 0);
  115.     Sleep(3.0);
  116.     SetCollideType(wall, 3);
  117.     }
  118. if ((GetSenderRef() == mustriggeron) && (GetSourceRef() == player) && (musplayed == 0))
  119.     {
  120.     looping = PlaySoundLocal(guymusic, 1.0, 0, 0x1, 0);
  121.     SetThingCurLightMode(player, 3);
  122.     }
  123. if ((GetSenderRef() == mustriggeroff) && (GetSourceRef() == player) && (musplayed == 0))
  124.     {
  125.     SetThingCurLightMode(player, 1);
  126.     StopSound(looping, 1.0);
  127.     }
  128. if ((GetSenderRef() == guytriggeron) && (GetSourceRef() == player))
  129.     {
  130.     MakeMeAPirate();
  131.     if (linedone = 0)
  132.         {
  133.         linedone = 1;
  134.         PlayVoice(player, guyline, 1.0, 0);
  135.         }
  136.     }
  137. if ((GetSenderRef() == guytriggeroff) && (GetSourceRef() == player))
  138.     {
  139.     MakeMeAPirate();
  140.     }
  141.  
  142. return;
  143.  
  144. # ........................................................................................
  145.  
  146. end
  147.